 <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ page session="true" import="servlets.*" %>
<%@ page session="true" import="classes.*" %>
<%@ page session="true" import="beans.*" %>
<%@ page session="true" import="java.sql.ResultSet" %>
<%  	session = request.getSession(true); %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<%@page import="java.util.List"%><html class="js" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Sistema de Noticias</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<%@ include file="inc_head.jsp" %>  

<script type="text/javascript">   
var j = jQuery;
j(document).ready(function(){
	j('#load').fadeOut(1000);
	}
);   
 </script> 
</head>
<body>  
<div id="page"> 
  <div id="wrapper"> 
    <div id="header"> <a href="?pg=index"><img src="index_arquivos/logo.png" alt="" id="logo"></a> 
      <h2><a href="Home"></a></h2> 
      <div class="slogan" style="color:#ffffff"></div> 
    </div> 
    <div id="left-col"> 
    
   <%@ include file="inc_menutop.jsp" %>   

      
      <!-- /nav -->  
      <div id="content"> 
        <div class="dbx-box" id="block-block"> 
          <div> 
            <% if (request.getParameter("msg_sucesso") != null) { %> 
            <div id="msg_sucesso"><% out.print(request.getParameter("msg_sucesso")); %></div>
            <% } %>
              <% if (request.getParameter("msg_erro") != null) { %> 
            <div id="msg_erro"><% out.print(request.getParameter("msg_erro")); %></div>
            <% } %> 
            
            <div style="float:left">
            	<h1>Videos</h1>
            </div
            <div id="load" style="display:block;float:left;padding-left:30px;">
			    <img src="images/loading.gif" width="10%" height="10%" />
			</div> 
			<div style="clear:both"></div>

  
  
				<%  	List<Video> videos = (List<Video>)session.getValue("videoss"); %> 
				   
				<% for(int i = 0; i < videos.size(); i++) {
					Video video = (Video)videos.get(i); 
				%>  
            
                    <div class="video"> 
                    
                        	<strong> <%  out.print(video.getTitulo());   %> </strong> 
                        	
                         	<a href="VideosDelete?id=<%  out.print(video.getId()); %>"><img src="css/itheme/images/mini-trash.gif" border="0"></a>
                        	  <br><%  out.print(video.getHTMLpeq());   %>   
                   </div> 
                   
                    
                <%    
				}
				%>   

     
     <br /><div style="clear:both"></div><br />
     



			<h2>Adicionar Video</h2>	
			
			  <form action="VideosAdd" method="post">	 
				                 
              <p>
              <span class="titulo_01">
              <strong>T&iacute;tulo do video</strong>:<br />
              <input type="text" name="titulo" id="titulo" style="width:280px"  />
              <br />
              
			  <strong>URL do video</strong>:<br />
              <input type="text" name="url" id="url" style="width:280px"  />
              <br />
			
              <p>
	              <span class="botao_comum" style="float:left">
	            	  <input type="submit" value="Enviar" />
	              </span>           
              </p>
				
				</form>



		</div> 
        </div> 
      </div> 
      <div id="footer">&nbsp;</div> 
    </div> 
    
    
   <%@ include file="inc_menu.jsp" %>  



    <hr class="hidden"> 
  </div> 
</div> 
</body>
</html>
